<div class="center">
	<a class="button preloader" href="<? echo redirect_str(PAGE_ADMIN_TEAM); ?>">PŘIDAT MUŽSTVO</a><br /><br />
</div>
  
  <div class="left-column">
    <table class="centered small-table">
      <tr>
        <th colspan="4">II. třída OP</th>
      </tr>
      <tr>
        <th></th>
        <th>tým</th>
        <th>zkratka</th>
        <th>akce</th>
      </tr>
      
      <?
      $pos = 1;
      $query = getTeams(2);
      while($fetch = MySQL_Fetch_Array($query)){
        $id = $fetch["ID_MUZSTVO"];
        $team = $fetch["NAZEV"];
        $zkratka = $fetch["ZKRATKA"];
        
        if($pos % 2 == 0) { echo "<tr class='second'>"; }
        else echo "<tr>";
          echo "<td>$pos</td>";
          echo "<td class='lefted'>$team</td>";
          echo "<td>$zkratka</td>";
          echo "<td><a class='preloader' href='".redirect_str(PAGE_ADMIN_TEAM).add_par("id_team=".$id)."'><img class='icon-btn' src='./img/icons/edit.png'></a>
                <a class='preloader' href='".redirect_str(PAGE_ADMIN_TEAMS).action(ACTION_DELETE_TEAM).add_par("id_team=".$id)."'><img class='icon-btn' src='./img/icons/delete.png'></a></td>";
        echo "</tr>";
        
        $pos++;
      }
      ?>
    </table>
  </div>
  
  <div class="right-column">
    <table class="centered small-table">
      <tr>
        <th colspan="4">III. třída OP</th>
      </tr>
      <tr>
        <th></th>
        <th>tým</th>
        <th>zkratka</th>
        <th>akce</th>
      </tr>
      
      <?
      $pos = 1;
      $query = getTeams(3);
      while($fetch = MySQL_Fetch_Array($query)){
        $id = $fetch["ID_MUZSTVO"];
        $team = $fetch["NAZEV"];
        $zkratka = $fetch["ZKRATKA"];
        
        if($pos % 2 == 0) { echo "<tr class='second'>"; }
        else echo "<tr>";
          echo "<td>$pos</td>";
          echo "<td class='lefted'>$team</td>";
          echo "<td>$zkratka</td>";
          echo "<td><a class='preloader' href='".redirect_str(PAGE_ADMIN_TEAM).add_par("id_team=".$id)."'><img class='icon-btn' src='./img/icons/edit.png'></a>
                <a class='preloader' href='".redirect_str(PAGE_ADMIN_TEAMS).action(ACTION_DELETE_TEAM).add_par("id_team=".$id)."'><img class='icon-btn' src='./img/icons/delete.png'></a></td>";
        echo "</tr>";
        
        $pos++;
      }
      ?>
    </table>
  </div>
  
  <div class="correct"></div>
  <br>
  
  <div class="left-column">
    <table class="centered small-table">
      <tr>
        <th colspan="4">IV. třída OP</th>
      </tr>
      <tr>
        <th></th>
        <th>tým</th>
        <th>zkratka</th>
        <th>akce</th>
      </tr>
      
      <?
      $pos = 1;
      $query = getTeams(4);
      while($fetch = MySQL_Fetch_Array($query)){
        $id = $fetch["ID_MUZSTVO"];
        $team = $fetch["NAZEV"];
        $zkratka = $fetch["ZKRATKA"];
        
        if($pos % 2 == 0) { echo "<tr class='second'>"; }
        else echo "<tr>";
          echo "<td>$pos</td>";
          echo "<td class='lefted'>$team</td>";
          echo "<td>$zkratka</td>";
          echo "<td><a class='preloader' href='".redirect_str(PAGE_ADMIN_TEAM).add_par("id_team=".$id)."'><img class='icon-btn' src='./img/icons/edit.png'></a>
                <a class='preloader' href='".redirect_str(PAGE_ADMIN_TEAMS).action(ACTION_DELETE_TEAM).add_par("id_team=".$id)."'><img class='icon-btn' src='./img/icons/delete.png'></a></td>";
        echo "</tr>";
        
        $pos++;
      }
      ?>
    </table>
  </div>
  
  <div class="right-column">
    <table class="centered small-table">
      <tr>
        <th colspan="4">ostatní mužstva</th>
      </tr>
      <tr>
        <th></th>
        <th>tým</th>
        <th>zkratka</th>
        <th>akce</th>
      </tr>
      
      <?
      $pos = 1;
      $query = getTeams("0");
      while($fetch = MySQL_Fetch_Array($query)){
        $id = $fetch["ID_MUZSTVO"];
        $team = $fetch["NAZEV"];
        $zkratka = $fetch["ZKRATKA"];
        
        if($pos % 2 == 0) { echo "<tr class='second'>"; }
        else echo "<tr>";
          echo "<td>$pos</td>";
          echo "<td class='lefted'>$team</td>";
          echo "<td>$zkratka</td>";
          echo "<td><a class='preloader' href='".redirect_str(PAGE_ADMIN_TEAM).add_par("id_team=".$id)."'><img class='icon-btn' src='./img/icons/edit.png'></a>
                <a class='preloader' href='".redirect_str(PAGE_ADMIN_TEAMS).action(ACTION_DELETE_TEAM).add_par("id_team=".$id)."'><img class='icon-btn' src='./img/icons/delete.png'></a></td>";
        echo "</tr>";
        
        $pos++;
      }
      ?>
    </table>
  </div>
  
  <div class="correct"></div>
